package com.tuanzi.loan.web.lazy.receipt.statistics;

import com.tuanzi.loan.business.service.receipt.statistics.ReceiptExtendStatisticsService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.receipt.statistics.ReceiptExtendStatisticsSearchRequest;
import com.tuanzi.loan.vo.response.receipt.statistics.ReceiptExtendStatisticsSearchResponse;
import org.springframework.data.domain.Page;

public class ReceiptExtendStatisticsLazyDataModel extends BaseLazyDataModel<ReceiptExtendStatisticsSearchRequest,ReceiptExtendStatisticsSearchResponse>{

    private ReceiptExtendStatisticsService receiptExtendStatisticsService= SpringContextHolder.getBean(ReceiptExtendStatisticsService.class);

    public ReceiptExtendStatisticsLazyDataModel(ReceiptExtendStatisticsSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<ReceiptExtendStatisticsSearchResponse> doLoad(PageSearcher<ReceiptExtendStatisticsSearchRequest> pageSearcher) {
        return receiptExtendStatisticsService.list(pageSearcher);
    }
}
